Repository navigation
feat(security): the App's installation tokens carry only the permissions the roadmap jobs use - #2482
Merged
Merged
Conversation
…ons the roadmap jobs use Each token request now sends a permissions body from CONST_GITHUB_APP_TOKEN_PERMISSIONS: issues, pull_requests and contents write, and checks, actions and metadata read. The installation grants read and write on every repository permission, so a token without this body could change settings, secrets, variables, environments and workflows. gidgethub's get_installation_access_token sends no body, so gidgethub's GitHubAPI signs the JWT and posts the request. The log names the permissions of GitHub's reply, without levels or the token. A reply that grants more is no error. GitHub refuses an ungranted permission with HTTP 422 and does not say which one, so the error names each permission that the token asks for. ADR 0015, the k8s README and the knowledge base say that each token is scoped to these permissions.
dan-petty
marked this pull request as ready for review
October 28, 2026 18:05
dan-petty
pushed a commit
that referenced
this pull request
Oct 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.10.0](v0.9.0...v0.10.0) (2026-10-28) ### Features * **review:** devops review intake hands the findings of a session on merged code to roadmap intake ([#2455](#2455)) ([a5c7b82](a5c7b82)) * **security:** devops k8s audit runs Popeye in the tool sandbox with a kube-api network profile that only reads the API server ([#2467](#2467)) ([e02c3fb](e02c3fb)) * **security:** the App's installation tokens carry only the permissions the roadmap jobs use ([#2482](#2482)) ([9599ef2](9599ef2)), closes [#2473](#2473) ### Bug Fixes * **config:** a config file that is not valid YAML stops the load with an error that quotes none of its text ([#2468](#2468)) ([91fe5dc](91fe5dc)) * **config:** config set reports an unknown key as unknown, not as a key that needs a value ([#2465](#2465)) ([8b650a6](8b650a6)) * **devcontainer:** run the checkout's devops in devcontainer terminals ([#2460](#2460)) ([abd2d41](abd2d41)) * **k8s:** loki runs from the grafana-community chart on loki 3.7.9, out of reach of CVE-2026-21729 ([#2470](#2470)) ([96c50c9](96c50c9)) * **security:** a credential keyword at the end of a line no longer masks the first word of the next line ([#2461](#2461)) ([b754a73](b754a73)) * **security:** a credential value is masked also when the next line starts with a parenthesis ([#2477](#2477)) ([ece25ca](ece25ca)), closes [#2471](#2471) * **security:** pin kubeconform and replace Checkov with Trivy's misconfiguration scan ([#2464](#2464)) ([960e357](960e357)) * **security:** refuse GCONV_PATH, SHELLOPTS, BASHOPTS and PS4 from a caller, and archive the merged security changes ([#2453](#2453)) ([1f9231d](1f9231d)) ### Code Refactoring * **ai:** chat_structured is the one structured-output path ([#2452](#2452)) ([3509732](3509732)) * **github:** pr check-readiness reads one merge-readiness verdict from github/ ([#2456](#2456)) ([16442c4](16442c4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This was referenced Oct 28, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each installation token request of GitHub App devops-cli-service now sends a
permissionsbody from one constant,CONST_GITHUB_APP_TOKEN_PERMISSIONS:issues,pull_requestsandcontentswrite, andchecks,actionsandmetadataread. The installation grants read and write on every repository permission (ADR 0015, #2454). Without the body, GitHub gave each token all of them, so a bug, a prompt injection or a leaked token could change repository settings, secrets, variables, environments and workflows.gidgethub 6.0.0's
get_installation_access_tokenposts an empty body and takes no permissions. The process now posts the request through gidgethub'sGitHubAPI, which signs the App's JWT, over the same session client.The log names the permissions of GitHub's reply, without their levels and without the token. A reply that grants more is no error.
GitHub refuses a permission that the installation does not grant with HTTP 422 ("The permissions requested are not granted to this installation.") and does not say which permission is missing. So the error names each permission that the token asks for, with GitHub's status and text. The OpenSpec design records why the change does not read the installation's permissions after a refusal.
ADR 0015, the "Roadmap service" text of k8s/README.md and the knowledge base's GitHub CLI page say that each token is scoped to these permissions, whatever the App grants.
Closes #2473